package com.yihen.util;

import com.yihen.dto.Result;

public class LevelCheck {
    // 权限验证
    public static Result levelIsOK(int level, String message) {
        int level_ = UserHolder.getUser().getLevel();
        if (level_ < level) {
            return new Result("权限不够," + message);
        } else return new Result(true);

    }
}
